package com.company;

public class Test32猴子分桃 {
    public static void main(String[] args) {
        for(int i=1;;i++){
            if(houzi(i)){
                System.out.println(i);
                return;
            }
        }
    }
    public static boolean houzi(int x){
        for(int i=0;i<5;i++) {
            if (x % 5 == 1) {
                x = x - 1;
                x = x - x / 5;
            } else {
                return false;
            }
        }
        return true;
    }
}
